package com.tjy;

import com.tjy.core.Downloader;
import com.tjy.util.LogUtils;

import java.util.Scanner;

/**
 * ClassName:Main
 * Description:主类
 * author: jiuyang
 * https://dldir1.qq.com/qqfile/qq/PCQQ9.7.23/QQ9.7.23.240807.exe
 * DateTime: 2024/8/13 下午4:22
 */
public class Main {
    public static void main(String[] args) {

        //下载地址
        String url = null;
        if (args==null||args.length==0){
            do {
                LogUtils.info("请输入下载地址：");
                Scanner scanner = new Scanner(System.in);
                url = scanner.next();
            } while (url == null);
        }else {
            url = args[0];
        }

        Downloader downloader = new Downloader();
        downloader.download(url);

    }
}
